all: build run report

build: dirs
	cd build && cmake ..
	cd build && make

run: build
	cd build && ./A
	cd build && ./C_D
	cd build && ./E
	cd build && ./F
	cd build && ./test

report: 
	cd doc && xelatex -interaction=batchmode design.tex
	cd doc && xelatex -interaction=batchmode report.tex

dirs:
	mkdir -p build
	mkdir -p figure

clean:
	rm -rf build
	rm -rf figure
	rm ./doc/*.aux ./doc/*.log ./doc/*.pdf

.PHONY: all build run report dirs clean